import request from '@/utils/request';
// 获取列表
export async function pageActing(data) {
  const res = await request.post('/ActingList', data);
  if (res.status === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.msg));
}
// 删除
export async function removeActing(ids) {
  const res = await request.post('/DeleteActing', ids);

  if (res.status === 0) {
    return res.msg;
  }
  return Promise.reject(new Error(res.msg));
}
// 添加
export async function addActing(data) {
  const res = await request.post('/AddActing', data);
  if (res.status === 0) {
    return res.msg;
  }
  return Promise.reject(new Error(res.msg));
}
// 修改
export const updateActing = async (data) => {
  const res = await request.post('/UpdateActing', data);
  if (res.status === 0) {
    return res.msg;
  }
  return Promise.reject(new Error(res.msg));
};
